﻿@model Domain.Entities.ProduceInPackage

@{
    ViewBag.Title = "Добавление товара на склад";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<h2>Добавление товара на склад</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Новый товар</legend>
        <div class="editor-label">
            Название
        </div>
        <div class="editor-field">
            @Html.DropDownList("ProduceId")
            @Html.ValidationMessageFor(model => model.ProduceId)
        </div>

        <div class="editor-label">
           Упаковка (грамм)
        </div>
        <div class="editor-field">
             @Html.DropDownList("PrepackageId")
            @Html.ValidationMessageFor(model => model.PrepackageId)
        </div>

        <div class="editor-label">
           Цена (грн)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Price)
            @Html.ValidationMessageFor(model => model.Price)
        </div>

        <div class="editor-label">
           Количество
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Count)
            @Html.ValidationMessageFor(model => model.Count)
        </div>

        <p>
            <input type="submit" value="Создать" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("К списку товаров на складе", "BrowseStorage")
</div>
